package fpa.test0731;

import java.util.Scanner;

public class yhsrjx {
    public static void main(String[] args){
        System.out.println("请输入存款金额:");
        int money=new Scanner(System.in).nextInt();
        System.out.println("请输入存款年限:");
        int year=new Scanner(System.in).nextInt();
        double outMony=0;
        if(year==1){outMony=money+money*2.25/100*1;
        }
        else if(year==2){
            outMony=money+money*2.7/100*2;
        }
        else if(year==3){
            outMony=money+money*3.25/100*3;
        }
        else if(year==5){
            outMony=money+money*3.6/100*5;
        }
        else{
            System.out.println("输入年限有误");
        }
        System.out.println("存款"+year+"年后的本息是："+outMony);

    }
}
